class Animal{
    private String name;
    private int age;

    public Animal() {
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
public class Test4 {
    public static void main(String[] args) {
        Animal c = new Animal();
        c.setName("白糖");
        c.setAge(3);
        System.out.println(c.getAge()+"岁的"+c.getName()+"吃小鱼干");
        System.out.println("====================");
        Animal a = new Animal("武松",4);
        System.out.println(a);
    }
}
